package com.sphd.beautysalon.adapters;

import android.text.TextUtils;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sphd.beautysalon.R;
import com.sphd.beautysalon.info.RestaurantInfo;

import java.util.List;

/**
 * Created by Hu on 2016/10/31.
 */

public class SupperMeangerAdapter extends BaseQuickAdapter<RestaurantInfo> {
    public SupperMeangerAdapter(int layoutResId, List<RestaurantInfo> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, RestaurantInfo restaurantInfo) {
        baseViewHolder.setText(R.id.title,TextUtils.isEmpty(restaurantInfo.getCg_name())? "待编辑" :restaurantInfo.getCg_name())
        .setText(R.id.time,"注册时间:" + restaurantInfo.getCg_regtime());
    }
}
